//package com.sure0000.basicKafka.example;
//
//
//import java.util.concurrent.ExecutionException;
//
///**
// * @program: demo
// * @description:
// * @author: xuyouchang@supcon.com
// * @create: 2019-12-03 13:54
// **/
//public class KafkaMain {
//
//    private static final String BOOTSTRAP_SERVER = "172.17.1.104:9092,172.17.1.105:9092,172.17.1.106:9092";
//    private static final String TOPIC = "ods.origin.snapshot.vehicle.info.in";
//    private static final Integer PARTITIONS = 3;
//    private static final Short REPLICAS = 1;
//    private static final String CONSUMER_GROUP = "test4";
//    private static final String SCHEMA_REGISTRY_URL = "http://10.10.77.151:8081";
//
//    public static void main(String[] args) {
//        jsonConsumer();
//    }
//
//
//    public static void avroProducer() {
//        KafkaProducerDemo producerDemo = new KafkaProducerDemo();
//        producerDemo.avroProducer(BOOTSTRAP_SERVER, 10, TOPIC, SCHEMA_REGISTRY_URL);
//    }
//
//
//    public static void jsonConsumer() {
//        KafkaConsumerDemo consumerDemo = new KafkaConsumerDemo();
//        consumerDemo.jsonComsumer(BOOTSTRAP_SERVER, CONSUMER_GROUP, TOPIC);
//    }
//
//
//    public static void createTopic() throws InterruptedException {
//        KafkaTopic topic = new KafkaTopic();
//        topic.createTopic(BOOTSTRAP_SERVER, TOPIC, PARTITIONS, REPLICAS);
//    }
//
//    public static void listTopic() throws ExecutionException, InterruptedException {
//        KafkaTopic topic = new KafkaTopic();
//        topic.listTopic(BOOTSTRAP_SERVER);
//    }
//
//
//}
